
// multi_threadDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "afxcmn.h"

#include "./Device/MyService.h"

#include <map>
using namespace std;

// Cmulti_threadDlg dialog
class Cmulti_thread_uban_simpleDlg : public CDialogEx
{
// Construction
public:
	Cmulti_thread_uban_simpleDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_multi_thread_uban_simple_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

private:
	MyService		m_MyService;
private:
	void	OnPenEvent(TABLET_MESSAGE_PEN* lpMsg);
// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
private:
	BOOL			m_bState;
	CButton			m_Btn_Listen;
	CIPAddressCtrl	m_Ip_HostIP;
	CEdit			m_Edit_Port;
	CStatic			m_Static_WorkView;

	CSize			m_tablet_size;

	CPen			m_pen;
	CDC*			m_pDC;
		
	CDC				m_MemDC;
	CBitmap			m_MemBitmap;
	CBitmap*		m_lpOldBitmap;
public:
	
protected:
	afx_msg LRESULT OnTabletEvents(WPARAM wParam, LPARAM lParam);

public:
	afx_msg void OnBnClickedBtnListen();
	afx_msg void OnDestroy();

	void SetControlPos();
	afx_msg void OnBnClickedBtnClear();
};
